package com.six.backend.utils;

import org.jasypt.util.text.BasicTextEncryptor;

@SuppressWarnings({"ALL", "AlibabaClassMustHaveAuthor"})
public class EncryptUtil {
    private static final BasicTextEncryptor ENCRYPTOR = new BasicTextEncryptor();

    static {
        ENCRYPTOR.setPassword("sixteam");
    }

    public static String encrypt(String password) {
        //要加密的数据（数据库的用户名或密码）
        return ENCRYPTOR.encrypt(password);
    }

    public static String decrypt(String password) {
        //要解密的数据（数据库的用户名或密码）
        return ENCRYPTOR.decrypt(password);
    }

}
